#pragma once

#include "Board.h"
#include "DeciplineCompositor.h"
#include "EmptyDecipline.h"
#include "OccupyDecipline.h"
#include "KeepDecipline.h"

class World
{
public:
	World(void);
	World(size_t const& row, size_t const& column);
	virtual ~World(void);
	size_t const getColumn() const
	{
		return board.getColumn();
	}
	size_t const getRow() const
	{
		return board.getRow();
	}
	virtual void show() const;
	virtual void refresh();
    void setSquare(size_t const& r, size_t const& c, int Value)
    {
        board.setSquare(r, c, Value);
    }
    void randomize()
    {
        board.randomize();
    }
    void clear()
    {
        size_t r(board.getRow()), c(board.getColumn());
        Board tmp(r, c);
        board.swap(tmp);
    }
protected:
	virtual void initDecipline();
private:
	Board board;
	DeciplineCompositor deciplines;
};
